<?php
class InputPassword extends InputField
{
	/**
	 * Create an <input type="password" /> field
	 *
	 * @param string $name	Field name
	 * @param string $value Field value
	 */
	public function __construct($name = 'password', $value = null)
	{
		if(isset($_POST[$name]))
		{
			$value = $_POST[$name];
		}
		parent::__construct('password', $name, $value);
	}
	
	/**
	 * 
	 * @see HTMLElement::getHTML()
	 */
	public function getHTML()
	{
		// value of password is always cleared before printing
		$this->clear();
		return parent::getHTML();		
	}
}